#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include "opencv2/imgproc.hpp"
#include <iostream>

using namespace cv;
using namespace std;

int main()
{

    Mat rgb_img = imread("../image.png");

    if ( !rgb_img.data )
    {
        printf("No image data \n");
        return -1;
    }

    imshow("rgb_img",rgb_img);
    waitKey(0);

    Mat gray_img;
    cvtColor(rgb_img, gray_img, COLOR_BGR2GRAY);

    imshow("gray_img", gray_img);
    waitKey(0);

    Mat gray_img2;
    cvtColor(rgb_img, gray_img2, COLOR_RGB2GRAY);

    imshow("gray_img", gray_img2);
    waitKey(0);


}
